package com.lft.examsys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lft.examsys.entity.Paper;
import com.lft.examsys.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    User findByUsername(String username);

    Integer register(User user);

    List<Paper> selectPapaersAllById(Integer id);

    Boolean updateUser(User user);

    boolean setRole(@Param("id") Integer id, @Param("role") String role);

    boolean ban(@Param("id") Integer id, @Param("ban") Boolean ban);
}
